<template>
  <div class="content-box">
    <curd-index
      :table-com="tableList"
      :form-com="addForm"
      :control="control"
      :searchable="searchable"
      :curd="curd"
      v-bind="$attrs"
      v-on="$listeners"
      :save-api="onSubit"
      :query="query"
    >
    </curd-index>
  </div>
</template>

<script>
import tableList from './components/tableList'
import addForm from '@/views/room_assign/components/addForm'
import indexMixin from '@/utils/mixin/curd-index'
import curd from '@/api/curd'

export default {
  data() {
    return {
      tableList,
      addForm,
      control: 'roomLeaseRecord',
      searchable: true,
      curd: ['*'],
      query:
      { 'filter[status]': '3'
        // 'op[room_id]': '<>'
      }

    }
  },
  mixins: [indexMixin],
  methods: {
    onSubit(data) {
      return curd('roomLeaseRecord').save(data)
    }
  }
}
</script>

<style scoped>

</style>
